import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter)

import Login from "@/views/login"
import user from "./modules/user"
import product from "./modules/product"

const frameIn = [user, product]
const frameOut = [
    {
        path: "/",
        redirect: "/login"
    },
    {
        path: '/login',
        component: Login
    },
    {
        path: '/ele',
        component: () => import("@/views/ele-demo/demo01.vue")
    }
]
const routes = [
    ...frameOut,
    ...frameIn
]



const router = new VueRouter({
    routes // (缩写) 相当于 routes: routes
})


export default router